-- Slash.lua
local ADDON, DFFT = ...
local DB = DFFT.DB
SLASH_FDF1 = "/fdf"
SLASH_DFFT1 = "/dfft"
SlashCmdList.DFFT = function(msg)
  msg = (msg or ""):lower()
  if msg == "test" then
    local function S(a,tier,crit,onTarget,delay)
      C_Timer.After(delay or 0, function()
        local txt = (tier=="small" and (DB.shortSmall and DFFT.shortNumberRounded(a) or tostring(a)))
                 or (tier=="medium" and (DB.shortMedium and DFFT.shortNumberRounded(a) or tostring(a)))
                 or DFFT.shortNumber(a)
        DFFT.showNumber(a, txt, tier, onTarget ~= false, crit or false)
      end)
    end
    S(420,"small",false,true,0.00)
    S(350000,"medium",false,true,0.15)
    S(2600000,"big",true,true,0.30)
    S(12500000,"vbig",true,true,0.45)
    S(160000,"small",false,false,0.10)
    S(740000,"medium",false,false,0.25)
    S(3200000,"big",true,false,0.40)
    S(18000000,"vbig",true,false,0.55)
  elseif msg == "recal" or msg == "calibrate" or msg == "recalibrate" then
    if DFFT.Auto_RecalibrateNow then DFFT.Auto_RecalibrateNow() end
  elseif msg == "thres" or msg == "thresholds" or msg == "show" then
    if DFFT.Auto_PrintThresholds then DFFT.Auto_PrintThresholds() end
  else
    DFFT.toggleOptions()
  end
end
